if (WIN32)
	if(MSVC)
		add_definitions(  -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE)
	else(MSVC)
        add_definitions(-DBOOST_ALL_NO_LIB)
	endif(MSVC)
else (WIN32)
endif (WIN32)



#SET_RUNTIME_LINK(STATIC)

include_directories( ${DEPENDENCIES_DIR}/include/fann/)
add_definitions(-DFANN_NO_DLL)
#add_definitions(-DFANN_DLL_EXPORTS)
#add_definitions(-D_USRDLL)

FILE(GLOB _H "*.h")
FILE(GLOB _CPP "*.cpp")
FILE(GLOB _C "*.c")
add_library (fann STATIC floatfann.c)
if(MSVC)
else(MSVC)
target_link_libraries( fann pthread)
endif(MSVC)

SET_TARGET_PROPERTIES( fann PROPERTIES RELEASE_OUTPUT_NAME "fann")
if (MSVC)
SET_TARGET_PROPERTIES( fann PROPERTIES DEBUG_OUTPUT_NAME "fann_d")
else(MSVC)
SET_TARGET_PROPERTIES( fann PROPERTIES DEBUG_OUTPUT_NAME "fann_d")
endif(MSVC)




if(ANDROID_NDK)
#target_link_libraries( network libgnustl_shared.so libcrystax_shared.so )
#target_link_libraries( network libgnustl_static.a libcrystax_static.a )
else(ANDROID_NDK)
if(UNIT_TEST)
    #add_executable(fanntest xor_train.cpp fann.c fann_cascade.c fann_error.c fann_io.c fann_train.c fann_train_data.c )
add_executable(fanntest xor_train.cpp floatfann.c )
if(MSVC)
else(MSVC)
#target_link_libraries( client pthread)
target_link_libraries( fanntest fann)
endif(MSVC)
endif(UNIT_TEST)
endif(ANDROID_NDK)
